﻿using MicroCloud.Mapping;
using MicroCloud.Packs;
using Microsoft.Extensions.DependencyInjection;
using Vinno.Brand.Pack.Core.Events;

namespace Vinno.Brand.Pack.Core
{
    public class BrandPack : PackBase
    {
        public override PackLevel Level => PackLevel.Business;

        public override int OrderNo => 0;

        public override IServiceCollection AddServices(IServiceCollection services)
        {
            services.AddSingleton<IMapTuple, BrandMapperConfiguration>();
            services.AddScoped<IBrandService, BrandService>();

            services.AddEventHandler<SuggestEventHandler>();
            return services;
        }

        public override void UsePack(IServiceProvider provider)
        {

            IsEnabled = true;
        }

    }
}